package Day12;

import java.util.List;

/**
 * @Author kalista
 * @Description 狗数据模型
 * @Date 2020/11/18  9:38
 **/
public class Dog implements Comparable<Dog>{

    //id
    private Integer id;
    //名字
    private String name;
    //年纪
    private Integer age;

    private List<String>  aihao;

    public Dog() {
    }

    public Dog(Integer id, String name, Integer age) {
        this.id = id;
        this.name = name;
        this.age = age;
    }


    public List<String> getAihao() {
        return aihao;
    }

    public void setAihao(List<String> aihao) {
        this.aihao = aihao;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "Dog{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                '}';
    }


    @Override
    public int compareTo(Dog o) {
        return o.getAge()-this.getAge();
    }
}
